-- card: 3649 from stack: in -- bmap block id: 5081 -- flags: 4000 -- background id: 2792 -- name: Primary Card ----- HyperTalk script ----- -- part 173 (field) -- low flags: 81 -- high flags: 0007 -- rect: left=151 top=70 right=339 bottom=360 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 0 -- font id: 3 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: DelFld ----- HyperTalk script ----- on mouseUp set lockText of the target to false click at 152, item 2 of the clickLoc click at 340, item 2 of the clickLoc with shiftKey put the selection into delFile if the selection is empty then set the lockText of the target to true exit mouseUp end if answer "Are you sure you want to delete this file?" with "Delete" or "Cancel" if it is "Cancel" then set the lockText of the target to true hide card field "select" hide card field "DelFld" exit mouseUp end if set the lockText of the target to true set the cursor to 4 set the lockScreen to true choose field tool get location of card field delFile show card field delFile click at it domenu "Clear Field" put number of lines in bkgnd field "List" into Count repeat with L= 1 to Count repeat while line L of bkgnd field "List" = delFile delete line L of bkgnd field "List" end repeat end repeat if delFile = field "Title" then cleanUp choose browse tool hide card field "select" hide card field "DelFld" end mouseUp on cleanUp put "<>" into field "Title" put empty into field "Text" end cleanUp -- part 64 (field) -- low flags: 81 -- high flags: 0004 -- rect: left=151 top=36 right=71 bottom=360 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 1 -- font id: 0 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: select ----- HyperTalk script ----- on mouseUp hide card field "select" hide card field "delfld" end mouseUp -- part 101 (button) -- low flags: 80 -- high flags: A003 -- rect: left=220 top=111 right=132 bottom=377 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 1 -- font id: 0 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: Sort Document Names ----- HyperTalk script ----- on mouseUp Sort end mouseUp on Sort show field "List" set the cursor to 4 --set the lockScreen to True set lockText of bkgnd field "List" to false get the loc of bkgnd field 2 click at it type tab if the selection is empty then exit Sort put sortLines(the selection) into the selection set lockText of bkgnd field "List" to true set the lockScreen to False end Sort -- part 103 (button) -- low flags: 80 -- high flags: A003 -- rect: left=222 top=136 right=156 bottom=379 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 1 -- font id: 0 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: Cancel ----- HyperTalk script ----- on mouseUp hide field "List" hide field "Instructions" hide button "Sort Document Names" hide button "Cancel" end mouseUp -- part 104 (button) -- low flags: 00 -- high flags: 8000 -- rect: left=231 top=0 right=18 bottom=297 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 1 -- font id: 0 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: Transfer ----- HyperTalk script ----- on mouseDown get PopUpMenu("Open Application...;Open Stack...;Bring this to my word processor;Go Home",0,20,232) if it is 1 then Get fileName ("APPL") open it exit mouseDown else if it is 2 then doMenu "Open Stack..." exit mouseDown else if it is 3 then get field "Text" Set the lockScreen to true get location of bkgnd field "Title" click at it type tab doMenu "Copy Text" open "MacWrite" exit mouseDown else if it is 4 then go Home exit mouseDown end if end if end if end if end mouseDown -- part 118 (button) -- low flags: 00 -- high flags: 8000 -- rect: left=63 top=0 right=18 bottom=97 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 1 -- font id: 0 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: Edit ----- HyperTalk script ----- on mouseDown get PopUpMenu("Undo;----------;Cut;Copy;Paste;----------;Find...;Replace",0,20,63) if it is 1 then doMenu "Undo" exit mouseDown else if it is 2 then exit mouseDown else if it is 3 then doMenu "Cut Text" exit mouseDown else if it is 4 then doMenu "Copy Text" exit mouseDown else if it is 5 then doMenu "Paste Text" exit mouseDown else if it is 6 then exit mouseDown else if it is 7 then Search1 exit mouseDown else if it is 8 then Verify exit mouseDown end if end if end if end if end if end if end if end if end mouseDown on Search1 ask "Find first occurence of..." put it into SearchString set cursor to 4 find chars SearchString in field "Text" end Search1 on Replace ask "Search for..." put it into SearchString if it is not empty then ask "Replace with..." put it into ReplaceString if it is not empty then set cursor to 4 put 1 into counter put word counter of field "Text" into checkWord if checkWord=SearchString then put ReplaceString into checkWord put checkWord into HoldingField put space after HoldingField repeat until checkWord is empty put counter+1 into counter put word counter of field "Text" into checkWord if checkWord=SearchString then put ReplaceString into checkWord put checkWord after HoldingField put space after HoldingField end repeat put HoldingField into field "Text" click at 4,41 end if end if end Replace on Verify beep Answer "This global replace is NOT undo-able!" with "OK" or "Cancel" If it is "OK" then Replace end verify -- part 119 (button) -- low flags: 00 -- high flags: 8000 -- rect: left=194 top=0 right=18 bottom=228 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 1 -- font id: 0 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: Size ----- HyperTalk script ----- on mouseDown get PopUpMenu("9;10;12;14;18;24;----------;Other...",0,20,195) if it is 1 then set textSize of field "Text" to 9 click at 5,67 exit mouseDown else if it is 2 then set textSize of field "Text" to 10 click at 5,67 exit mouseDown else if it is 3 then set textSize of field "Text" to 12 click at 5,67 exit mouseDown else if it is 4 then set textSize of field "Text" to 14 click at 5,67 exit mouseDown else if it is 5 then set textSize of field "Text" to 18 click at 5,67 exit mouseDown else if it is 6 then set textSize of field "Text" to 24 click at 5,67 exit mouseDown else if it is 7 then exit mouseDown else if it is 8 then get field "Text" Set the lockScreen to true get location of bkgnd field "Title" click at it type tab doMenu "Text Style..." click at 5,67 exit mouseDown end if end if end if end if end if end if end if end if end mouseDown -- part 122 (button) -- low flags: 00 -- high flags: 8002 -- rect: left=428 top=23 right=37 bottom=451 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 1 -- font id: 0 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: 10 ----- HyperTalk script ----- on mouseUp Type " " end mouseUp -- part 124 (button) -- low flags: 00 -- high flags: 8002 -- rect: left=450 top=23 right=37 bottom=472 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 1 -- font id: 0 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: 50 ----- HyperTalk script ----- on mouseUp Type " " end mouseUp -- part 125 (button) -- low flags: 00 -- high flags: 8002 -- rect: left=470 top=23 right=37 bottom=498 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 1 -- font id: 0 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: 100 ----- HyperTalk script ----- on mouseUp Type " " end mouseUp -- part 126 (button) -- low flags: 00 -- high flags: 8001 -- rect: left=392 top=23 right=37 bottom=428 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 1 -- font id: 0 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: Tabs: -- part 129 (button) -- low flags: 00 -- high flags: 0000 -- rect: left=0 top=0 right=18 bottom=28 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 1 -- font id: 0 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: Apple Menu ----- HyperTalk script ----- on mouseDown get PopUpMenu(" About HyperWrite; Word Count;----------; Desk Accessories",0,20,1) if it is 1 then visual effect iris open go to card "Info" visual effect dissolve go to card "Info2" exit mouseDown else if it is 2 then get the length of field "Text" put it/5 into temp Answer "There are about "& round (temp) & " words in this document." exit mouseDown else if it is 3 then exit mouseDown else if it is 4 then set cursor to 4 getDANames doList "Select","Cancel",namesOfDAs,one get the result if it<1 then exit mouseDown else doMenu item 2 of it exit mouseDown end if end if end if end if end if end mouseDown -- part 132 (button) -- low flags: 00 -- high flags: 8000 -- rect: left=97 top=0 right=18 bottom=155 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 1 -- font id: 0 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: Format ----- HyperTalk script ----- on mouseDown get PopUpMenu("Left Justify;Right Justify;Center;----------;Single Space;Double Space;----------;Plain;Bold;Italic;----------;Other...",0,20,97) if it is 1 then set textAlign of field "Text" to left click at 5,67 exit mouseDown else if it is 2 then set textAlign of field "Text" to right click at 5,67 exit mouseDown else if it is 3 then set textAlign of field "Text" to center click at 5,67 exit mouseDown else if it is 4 then exit mouseDown else if it is 5 then get textSize of field "Text" put it into temp set textSize of field "Text" to temp click at 5,67 exit mouseDown else if it is 6 then get textSize of field "Text" put it into temp set textSize of field "Text" to temp get textHeight of field "Text" put 2*it into temp set textHeight of field "Text" to temp click at 5,67 exit mouseDown else if it is 7 then exit mousedown else if it is 8 then set textStyle of field "Text" to plain click at 5,67 exit mouseDown else if it is 9 then set textStyle of field "Text" to bold click at 5,67 exit mouseDown else if it is 10 then set textStyle of field "Text" to italic click at 5,67 exit mouseDown else if it is 11 then exit mouseDown else if it is 12 then get field "Text" Set the lockScreen to true get location of bkgnd field "Title" click at it type tab doMenu "Text Style..." click at 5,67 exit mouseDown end if end if end if end if end if end if end if end if end if end if end if end if end mouseDown -- part 180 (field) -- low flags: 80 -- high flags: 0000 -- rect: left=156 top=120 right=205 bottom=356 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 0 -- font id: 3 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: Sample -- part contents for background part 47 ----- text ----- Sunday, April 3, 1988 -- part contents for background part 64 ----- text ----- Sample -- part contents for card part 64 ----- text ----- Click on the file to be deleted or here to Cancel "Delete" -- part contents for background part 70 ----- text ----- Select a document to open from the list on the left, or click a button below: -- part contents for background part 71 ----- text ----- April 3, 1988 -- part contents for card part 173 ----- text ----- Sample -- part contents for card part 180 ----- text ----- This is a sample HyperWrite document, creatively called “Sample.” For detailed information and instructions, select “About HyperWrite” from under the Apple menu. -- part contents for background part 34 ----- text ----- Sample -- part contents for background part 33 ----- text ----- This is a sample HyperWrite document, creatively called “Sample.” For detailed information and instructions, select “About HyperWrite” from under the Apple menu. Remember - you must have the “HyperWrite Printer” file in the same folder as your HyperCard program for one of this stack's printing functions to work! If this is your first looks at HyperWrite 2.0, and you're already familiar with the first version, here is a summary of the differences: • The menu bar has been raised to provide a larger text area. • “Find” and “Replace” features have been added. Please check the instructions for the “Edit” menu for details. • Files can now have multi-word names. • “New & Get Address” brings you to Apple's standard Address stack. With this stack you should also have received an “Address Button” that will install a button on that stack which will bring you back to HyperWrite, and automatically address a letter to the person you specified. • “Print Selection” now functions as it should, printing whatever area of your document you were last looking at (it used to always print the first section of the document). • There's been an overall cleaning up of both the program (better “error-trapping”) and the documentation. The “Sort” problem has been fixed.